<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('\home\index');
});

// 引导用户到新浪微博的登录授权页面
//Route::get('auth/weibo', 'Auth\AuthController@weibo');
// 用户授权后新浪微博回调的页面
//Route::get('auth/callback', 'Auth\AuthController@callback');

Route::post('ajax','CheckController@ajax');                    //ajax验证
Route::get('verify','CheckController@verifyimg');              //图片验证码
Route::post('checkimg','CheckController@checkimg');            //图片验证
Route::post('checktype','CheckController@checkLoginType');     //登陆类型判断
Route::post('send','CheckController@checkmessage');            //发送手机验证
Route::post('email','CheckController@checkemail');            //发送手机验证

/**
 * Home下的普通路由
 */
Route::get('cat/{cat_id}','Home\CatController@cat');            //栏目路由
Route::get('art/{art_id}','Home\ArtController@art');            //文章路由
Route::get('/rank', 'Home\RankController@index');               //排行榜路由
Route::get('/record','Home\RecordController@index');            //游戏记录路由

/**
 * Admin下的路由
 */
Route::get('admin/index','Admin\IndexController@index');       //后台首页路由
Route::get('admin/login','Admin\IndexController@login');       //后台登陆路由
//后台设置路由
Route::match(['post','get'],'admin/option','Admin\OptionController@setOption');
Route::controller('admin','Admin\AdminController');            //后台管理员隐藏控制器
Route::controller('admin_art','Admin\ArtController');          //后台文章管理隐藏控制器
Route::controller('admin_cat','Admin\CatController');          //后台栏目管理隐藏控制器
Route::controller('admin_user','Admin\UserController');        //后台用户管理隐藏控制器
Route::controller('admin_game','Admin\GameController');        //后台游戏管理隐藏控制器

/**
 * Home下的分组路由
 */
Route::controller('game','Home\GameController');                //游戏隐藏控制器
Route::controller('user','Home\UserController');                //用户隐藏控制器
Route::controller('/','Home\IndexController');                  //首页隐藏控制器
Route::controller('grade','Home\GradeController');              //用于游戏